import request from "@/utils/request"

// 新增退换货
export const createExchange = (data) =>
  request({
    url: `/order/exchange/create`,
    method: "post",
    data,
  })

// 退换货详情
export const exchangeDetail = (params) =>
  request({
    url: `/order/exchange/detail`,
    method: "get",
    params,
  })

// 修改退换货
export const updateExchange = (data) =>
  request({
    url: `/order/exchange/update`,
    method: "post",
    data,
  })

// 退换货审核
export const returnReview = (data) =>
  request({
    url: `/order/exchange/review`,
    method: "post",
    data,
  })

export const exchangeStatus = (data) =>
  request({
    url: `/order/exchange/statusStats`,
    method: "post",
    data,
  })

// 退换货列表
export const getExchangeList = (data) => {
  return request({
    url: "/order/exchange/list",
    method: "post",
    data,
  })
}
